let s = document.createElement("style");
s.innerHTML = ".wings-disabled { padding-left: 12px; padding-right: 12px; }";
document.getElementsByTagName("head")[0].appendChild(s);
let app_btns = [
    'open-app',
    'm-video-season-new',
    'm-video-season-panel',
    'player-mobile-ending-panel-recommend',
    'm-home-no-more',
    'open-app-btn m-nav-openapp',
    'open-app-btn m-video-main-openapp visible-open-app-btn',
    'open-app-btn m-video-main-openapp hiden-open-app-btn',
    'open-app-btn related-openapp',
    'open-app-btn hot-share-openapp',
    'open-app-btn hotShare-openapp',
    'open-app-btn hotshare-openapp',
    'open-app-btn m-hot-share-openapp',
    'open-app-btn m-hotShare-openapp',
    'open-app-btn m-hotshare-openapp',
    'open-app-btn m-float-openapp',
    'open-app-btn m-space-float-openapp',
    'open-app-btn home-float-openapp',
    'open-app-btn m-comment-openapp'
];

setInterval(function () {
    app_btns.forEach(c => {
        for (let e of document.getElementsByClassName(c)) {
            if (e) e.remove();
        }
    });
    for (let e of document.getElementsByClassName('open-app-btn v-card-toapp')) {
        if (e.getAttribute('data-aid')) {
            e.firstElementChild.href = "https://m.bilibili.com/video/av" + e.getAttribute('data-aid');
        }
    }
    for (let e of document.getElementsByClassName('wings')) {
        if (e.getAttribute('type') == "8" && e.getAttribute("id")) {
            let a = document.createElement("a");
            a.href = "https://m.bilibili.com/video/av" + e.getAttribute("id");
            e.replaceWith(a);
            a.appendChild(e);
            e.className = 'wings-disabled';
        }
    }
}, 300);